@echo off
echo 简单编译测试
echo ============

echo.
echo 1. 进入backend目录...
cd backend

echo.
echo 2. 清理项目...
mvn clean

echo.
echo 3. 编译项目...
mvn compile -q

echo.
echo 4. 检查编译结果...
if exist "target\classes\com\company\anr\model\AnalysisRequest.class" (
    echo ✅ 模型类编译成功
) else (
    echo ❌ 模型类编译失败
)

if exist "target\classes\com\company\anr\controller\AnalysisController.class" (
    echo ✅ 控制器编译成功
) else (
    echo ❌ 控制器编译失败
)

if exist "target\classes\com\company\anr\service\WebAutomationService.class" (
    echo ✅ 服务类编译成功
) else (
    echo ❌ 服务类编译失败
)

echo.
echo 5. 尝试运行Spring Boot应用...
echo 如果编译成功，将启动应用...
mvn spring-boot:run -q

echo.
echo 测试完成！
echo.
echo 按任意键关闭...
pause > nul
